
// 更多按钮
$(function () {
    document.news = $('.show_list').children("li");
    document.news_index = 5;
    document.step = 5;
})

function getMore() {
    console.log(document.news.length)
    if (document.news_index >= document.news.length) {
        layer.alert('到底啦~', {
            offset: '100px'
        })
    } else {
        let j = 1;
        for (let i = document.news_index; i < document.news_index + document.step; i++) {
            setTimeout(() => {
                $(document.news[i]).css({
                    'display': 'flex',
                });
                setTimeout(()=> {
                    $(document.news[i]).css({
                        'opacity': '1',
                        'max-height': '300px',
                    });
                }, j * 40)
            }, j * 20)
            j++;
        }
    }

    document.news_index = document.news_index + document.step > document.news.length ? document.news
        .length : document.news_index + document.step;
}